/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine - graphics/renderer/renderstates
// Copyright (c) 2015.  All Rights Reserved
//
// File:		AEStateGroupRasterizer.inl
// Author:		Gianluca Belardelli
// Date:		17/07/2015
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AESTATEGROUPRASTERIZER_INL_
#define _AESTATEGROUPRASTERIZER_INL_

AE_FORCEINLINE AEStateGroupRasterizer::AEStateGroupRasterizer( void ) 
{
	memset( this, 0, sizeof(AEStateGroupRasterizer) ); ///< turn off everything by default
	m_ucFillMode = AEFILLMODE_SOLID;
	m_ucCullMode = AECULLMODE_BACK;
	m_ucFlags = AESHADER_RASTERIZERSTATEBIT_FRONTCCW;
}

/// \brief
///   Assignment operator
AE_FORCEINLINE AEStateGroupRasterizer &AEStateGroupRasterizer::operator = ( const AEStateGroupRasterizer &other )
{
	memcpy( this, &other, sizeof(AEStateGroupRasterizer) );
	return *this;
}

/// \brief
///   Comparison operator
AE_FORCEINLINE bool AEStateGroupRasterizer::operator == ( const AEStateGroupRasterizer &other ) const
{
	if( m_uiHash != other.m_uiHash )
		return false;
	else
		return memcmp( this, &other, sizeof(AEStateGroupRasterizer) ) == 0;
}

/// \brief
///   Comparison operator
AE_FORCEINLINE bool AEStateGroupRasterizer::operator != ( const AEStateGroupRasterizer &other ) const
{
	return !( *this == other );
}  

#endif // _AESTATEGROUPRASTERIZER_INL_

